package com.kuangstudy.framework.core;

import com.kuangstudy.framework.view.ModelAndView;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.lang.reflect.Method;

/**
 * 适配器
 */
public abstract class AbstractDispatcher {

	protected Object instance;
	protected Method method;
	protected Class<?>[] parameters;

	public AbstractDispatcher(Object instance,Method method,Class<?>[] parameters){
		this.instance = instance;
		this.method = method;
		this.parameters = parameters;
	}

	public abstract Object  invoke(HttpServletRequest request, HttpServletResponse response)
			throws IOException, ReflectiveOperationException;
}